import { ref, computed } from "vue"
import { defineStore } from "pinia"

// 状态管理
export const useAppStore = defineStore(
    "app",
    () => {
        const count = ref(11111)
        const doubleCount = computed(() => count.value * 2)
        function increment() {
            count.value++
        }

        return { count, doubleCount, increment }
    },
    {
        persist: true
    }
)
